home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
os2
/
lbasic06
/
radiobtn.bas
< prev
next >
Wrap
BASIC Source File
|
1994-03-12
|
1KB
|
46 lines
'demonstrates radiobuttons
'don't open a main window, please
nomainwin
WindowWidth = 270
WindowHeight = 200
statictext #cfg, "Confirm File Operations:", 20, 20, 200, 20
radiobutton #cfg.always, "Always", [alwaysConfirm], [nil], 40, 45, 130, 20
radiobutton #cfg.whenReplacing, "When Replacing", [whenReplacingConfirm], [nil], 40, 70, 130, 20
radiobutton #cfg.never, "Never", [neverConfirm], [nil], 40, 95, 130, 20
button #cfg, " &OK ", [cfgOk], UL, 20, 125
open "Action Confirmation - Setup" for dialog as #cfg
print #cfg, "trapclose [cfgOk]"
[inputLoop]
input h$
goto [inputLoop]
[alwaysConfirm]
confrm$ = "always"
goto [inputLoop]
[whenReplacingConfirm]
confrm$ = "whenReplacing"
goto [inputLoop]
[neverConfirm]
confrm$ = "never"
goto [inputLoop]
[cfgOk]
confirm "Save this configuration?"; answer$
'perform some sort of save for config here
close #cfg
end